<ul class="buttons">
  <% if !@publication.pubmed_id.nil? %>
    <li><%= image_tag_for_key('visit_pubmed', "http://www.ncbi.nlm.nih.gov/pubmed/#{@publication.pubmed_id}", nil, {:popup => true}, 'View Publication On PubMed') -%></li>
  <% elsif !@publication.doi.nil? %>
    <li><%= image_tag_for_key('visit_pubmed', "http://dx.doi.org/#{@publication.doi}", nil, {:popup => true}, 'View Publication') -%></li>
  <% end -%>
  <% if Authorization.is_authorized?("edit", nil, @publication, current_user) -%>
      <li><%= image_tag_for_key('manage', edit_publication_path(@publication), nil, nil, 'Manage Publication') -%></li>
  <% end -%>

  <% if Authorization.is_authorized?("destroy", nil, @publication, current_user) -%>
      <li><%= image_tag_for_key('destroy', publication_path(@publication), nil, { :confirm => 'This will unregister this publication with MethodBox. Are you sure wish to do this?', :method => :delete }, 'Unregister') -%></li>
  <% end -%>
</ul>

<%= render :partial => "layouts/item_title",:locals=>{:item=>@publication} %>

<div class="show_basic">
  <div class="main_content_left_box">
    <div class="box_about_actor">
      <p>
        <% unless @publication.pubmed_id.nil? %>
          <label>PubMed ID:</label>
          <%= link_to @publication.pubmed_id, "http://www.ncbi.nlm.nih.gov/pubmed/#{@publication.pubmed_id}",{:popup => true} %>
        <% end %>
        <% unless @publication.doi.nil? %>
          <label>DOI:</label>
          <%= link_to @publication.doi, "http://dx.doi.org/#{@publication.doi}",{:popup => true} %>
        <% end %>
      </p>
      <!-- no projects in methodbox -->
      <!-- <p> -->
        <!-- <label>Project:</label> -->
        <%# if @publication.project.nil? -%>
          <%#= text_or_not_specified nil %>
        <%# else -%>
          <%#= link_to h(@publication.project.name),@publication.project %>
        <%# end -%>
      <!-- </p> -->
      <p>
        <label>Author<%= @publication.asset.creators.size + @publication.non_seek_authors.size > 1 ? "s" : "" -%>:</label>
        <% if @publication.asset.creators.empty? && @publication.non_seek_authors.empty? %>
          <span class='none_text'>Not specified</span>
        <% else %>
          <% @publication.asset.creators.each do |author| %>
            <%= (link_to author.person.name, person_path(author.person)) %>
          <% end %>
          <% @publication.non_seek_authors.each do |author| %>
            <%= author.last_name + " " + author.first_name + ((author == @publication.non_seek_authors.last) ? "" : ", ") %>
          <% end %>
        <% end %>
      </p>
      <p>
        <label>Journal:</label>
        <%=h @publication.journal -%>
        <br/>
        <label>Date Published:</label>
        <%= @publication.published_date.strftime("#{@publication.published_date.day.ordinalize} %B %Y") -%>
      </p>

      <p>
        <b>Abstract:</b>
        <% unless @publication.abstract.blank? -%>
          <div class="box_standout" id="description">
            <%= simple_format(auto_link(white_list(@publication.abstract),:all,:rel=>'nofollow')) -%>
          </div>
        <% else -%>
          <p class="none_text">
            No abstract.
          </p>
        <% end -%>
      </p>

    </div>
  </div>
<!-- no related items for publications yet -->
  <!-- <div style="clear:both;padding-top:1em;">     -->
    <%#= render :partial=>"layouts/items_related_to",:object => @publication %>
  <!-- </div> -->
</div>